package com.zj.transactionspringboot01.application;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.AutoConfigurationImportSelector;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan({"com.zj.transactionspringboot01.controller",
        "com.zj.transactionspringboot01.service",
        "com.zj.transactionspringboot01.springboot"
})
//将启动类放在application包下是为了测试类用此类启动时不扫描transactionspringboot01全包
//主配置类不会扫描test包下的类
//主配置类中扫描到其他配置类（也是一个bean）中由componentscan，会合并扫描结果。
public class TsacSpringboot01Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(TsacSpringboot01Application.class, args);
    }

}
